﻿using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MapHello.Data
{
    class MapHelloDataContext : DataContext
    {
        // Specify the connection string as a static, used in main page and app.xaml.
        public const string DBConnectionString = "Data Source=isostore:/MapHelloDB.sdf";

        // Pass the connection string to the base class.
        public MapHelloDataContext(string connectionString = DBConnectionString)
            : base(connectionString)
        {
            if (!this.DatabaseExists())
            {
                this.CreateDatabase();
            }
        }

        public Table<Person> Persons = null;
        public Table<Config> Configs = null;
    }
}
